//
//  SCBaseModel.m
//  Assembly
//
//  Created by 葛悦彣 on 2023/11/10.
//

#import "SCBaseModel.h"

@implementation SCBaseModel
///deviceType 对应设备类型 扫码验证时存在会返回对应类型 1 天线 2 通控 3 猫 4 天线主板 5 通控主板

///返回工作台cell的名称
+ (NSString *)xxlrCellNameWithType:(SBdeviceType)type {
    if(type == KSBdeviceTypeTX){
        return @"天线单元信息录入";
    } else if(type == KSBdeviceTypeTK){
        return @"通控信息录入";
    } else if(type == KSBdeviceTypeM){
        return @"猫信息录入";
    } else if(type == KSBdeviceTypeTXZB){
        return @"天线主板信息录入";
    } else if(type == KSBdeviceTypeTKZB){
        return @"通控主板信息录入";
    } else {
        return @"--";
    }
}

///返回工作台cell的图片名称
+ (NSString *)xxlrCellImgNameWithType:(SBdeviceType)type {
    if(type == KSBdeviceTypeTX){
        return @"txdanyuan";
    } else if(type == KSBdeviceTypeTK){
        return @"tongkong";
    } else if(type == KSBdeviceTypeM){
        return @"mao";
    } else if(type == KSBdeviceTypeTXZB){
        return @"txzhuban";
    } else if(type == KSBdeviceTypeTKZB){
        return @"tkzhuban";
    } else {
        return @"--";
    }
}
@end
@implementation SCInputDeviceTypeModel

+ (NSDictionary *)modelCustomPropertyMapper {
    return @{@"ID"  : @"id",
    };
}

@end
@implementation SCInputMainBoradVersionModel

+ (NSDictionary *)modelCustomPropertyMapper {
    return @{@"ID"  : @"id",
    };
}


@end
@implementation SCInputVersionProgramModel

+ (NSDictionary *)modelCustomPropertyMapper {
    return @{@"ID"  : @"id",
    };
}
@end

@implementation SCInputVersionSoftModel

+ (NSDictionary *)modelCustomPropertyMapper {
    return @{@"ID"  : @"id",
    };
}
@end


@implementation SCInputDeviceModelModel

+ (NSDictionary *)modelCustomPropertyMapper {
    return @{@"ID"  : @"id",
    };
}

@end

@implementation SCInputModemVersionModel

+ (NSDictionary *)modelCustomPropertyMapper {
    return @{@"ID"  : @"id",
    };
}
@end

@implementation SCInputInquireModel

+ (NSDictionary *)modelCustomPropertyMapper {
    return @{@"ID"  : @"id",
    };
}
@end

@implementation SCXQModel

-(BOOL)isXQXG {
    if(self.deviceDetail){///是详情录入
        if(self.deviceType == KSBdeviceTypeTX ||self.deviceType ==  KSBdeviceTypeTK){///是通控和天线的大前提,录入不需要考虑默认为不能修改
//            if(self.canModify){///可以修改
                return YES;
//            }
        }
    }
    
    return NO;
}
-(BOOL)isXQShowCellEditBtnHidden{
    if(self.deviceType == KSBdeviceTypeTX ||self.deviceType ==  KSBdeviceTypeTK){///是通控和天线的大前提,录入不需要考虑默认为不能修改
        if(self.canModify){
            return NO;
        } else {
            return YES;
        }
    }
    return YES;
}
-(BOOL)isXQShowQRR {
    if(self.isXQXG){
        if(self.confirmPerson.length > 0){///有确认人并且可以有确认无误
            return YES;
        }
    }
    return NO;
}
- (BOOL)isXQShowRWWW{
    if(self.isXQXG){
        if(self.canConfirm){
            return YES;
        }
    }
    return NO;
}
- (BOOL)isXQEditBtnHidden{
    if(self.deviceType == KSBdeviceTypeTX || self.deviceType == KSBdeviceTypeTK){///是通控和天线的大前提
        if(self.canModify){///可以修改
            return NO;
        }
    } else {
        if(self.deviceDetail){
            if(self.canModify){
                return NO;
            }
        } else {
            if(self.isEdit){
                return NO;
            }
        }
       
    }
    return YES;
}
@end
@implementation SCMaintenanceTypeCountModel
@end
